home *** CD-ROM | disk | FTP | other *** search
- ;
- ;$VER: Tower of Babel HD Installer script v1.00 (c) 1997 John Girvin
- ;
-
- ;---------------------------------------------------------------------------
- ; Make a disk image
-
- (procedure S_MakeDisk #TDISKNUM #TDISKNAME
- (
- (set #TDATFILE (tackon #TDATDIR (cat "Disk." #TDISKNUM)))
-
- (message
- (cat
- "\n\n\nPlease insert Tower of Babel "
- #TDISKNAME
- " in drive DF"
- #TSRCDRIVE
- ":\n\n"
- "Click 'Proceed' when ready."
- )
- )
-
- (working
- (cat "Creating image of "
- #TDISKNAME
- " in\'" #TDATDIR "'"
- )
- )
-
- (set #TRCODE (run (cat "TOBMakeDisk " #TSRCDRIVE " " #TDATFILE)))
-
- (if (>= #TRCODE 100)
- (abort
- (cat
- "Could not create image of "
- #TDISKNAME
- " !\n\nError: " #TRCODE
- )
- )
- )
- ))
-
- ;---------------------------------------------------------------------------
- ; Make game disk image/data
-
- (procedure S_InstallGame
- (
- ;
- ; Make the game disk image
- ;
- (S_MakeDisk 1 "game disk")
-
- ;
- ; Copy extractor slave to destination
- ;
- (copyfiles
- (prompt "Copying data extractor slave")
- (help @copyfiles-help)
- (source "TOBMakeDat")
- (dest #TDESTDIR)
- (nogauge)
- (noposition)
- (optional fail force)
- )
-
- ;
- ; Call the data extractor
- ;
- (message "\n\n*** WARNING ***\n\n"
- "The next stage of the installation process requires that"
- " multitasking be disabled temporarily while a data file"
- " is being read and decrypted. This may take up to one"
- " minute depending on the speed of your computer.\n\n"
- " Please ensure that all disk and network activity has"
- " finished before clicking 'Proceed'.\n\n"
- "Click 'Proceed' when ready."
- )
-
- (working
- (cat "Creating game data file in '" #TDATDIR "'\n\n"
- "*** Multitasking is disabled - DON`T PANIC! ***"
- )
- )
-
- (set #TOLDEXEDIR @execute-dir)
- (set @execute-dir #TDESTDIR)
- (run
- (cat
- (tackon #TDESTDIR
- "WHDLoad SLAVE=TOBMakeDat NOVBRMOVE NOCACHE NOAUTOVEC NOTRAPHANDLER"
- )
- )
- )
- (set @execute-dir #TOLDEXEDIR)
-
- ;
- ; Delete the data extractor
- ;
- (delete
- (tackon #TDESTDIR "TOBMakeDat")
- (prompt "Deleting data extractor slave")
- (optional fail force)
- )
-
- ;
- ; Did the data extractor work?
- ; Check that the file was created
- ;
- (if (<> (getsize (tackon #TDATDIR "main")) 96768)
- (abort "Could not create data file !")
- )
-
- (message "\n\nData file successfuly created!"
- "\n\nMultitasking is re-enabled."
- )
- ))
-
- ;---------------------------------------------------------------------------
- ; Make save disk images
-
- (procedure S_InstallSaves
- (
- ;
- ; Get number of save disks to create in total
- ;
- (set #TNUMSAVE
- (asknumber
- (prompt "How many virtual save disks do you want to use in total?\n\n"
- "Each save disk requires approximately 900K of hard drive space."
- )
- (range 1 8)
- (default 1)
- (help @asknumber-help)
- )
- )
-
- ;
- ; Create blank save disk images
- ;
- (set #TSAVENUM 1)
- (until
- (> #TSAVENUM #TNUMSAVE)
- (
- (set #TSAVENAM (tackon #TDATDIR (cat "Disk." (+ 1 #TSAVENUM))))
- (working (cat "Creating blank save disk image\n" #TSAVENAM))
- (set #TRCODE (run (cat "TOBMakeSave " #TSAVENAM)))
- (if (>= #TRCODE 100)
- (abort
- (cat "Could not create blank save disk image !\n\nError: " #TRCODE)
- )
- )
- (set #TSAVENUM (+ #TSAVENUM 1))
- )
- )
-
- ;
- ; Install save disks, overwriting blanks created above
- ;
- (set #TSAVEDONE 0)
- (set #TSAVENUM 1)
- (set #TSAVEPMT "any existing save disks")
- (until
- (= 1 #TSAVEDONE)
- (if (> #TSAVENUM #TNUMSAVE)
- (set #TSAVEDONE 1)
- (if (= 0
- (askbool
- (prompt (cat "Do you want to install " #TSAVEPMT "?"))
- (help @askchoice-help)
- )
- )
- (set #TSAVEDONE 1)
- (
- (S_MakeDisk (+ 1 #TSAVENUM) (cat "save disk " #TSAVENUM))
- (set #TSAVENUM (+ #TSAVENUM 1))
- (set #TSAVEPMT "another existing save disk")
- )
- )
- )
- )
- ))
-
- ;---------------------------------------------------------------------------
-
- (welcome "Welcome to the Tower of Babel HD Installer")
- (set @app-name (cat "Tower of Babel"))
- (set #TROOTDIR "RAM:")
- (set #TDESTDIR "")
- (set #TDATDIR "")
- (set #TSRCDRIVE 0)
-
- (if (<> @user-level 2)
- (abort "You must select 'Expert' user level")
- )
-
- (if (< @installer-version 2818051)
- (abort "This package requires at least version 43.3 of the Installer program")
- )
-
- (message "\n\nWelcome to the Tower of Babel HD Installer\n"
- "(c) 1997 John Girvin\n\n"
- "Please read the documentation thoroughly before"
- " attempting to use this installer!\n\n"
- "This is version 1.00\n\n"
- "Click 'Proceed' to begin."
- )
-
- ;
- ; Get directory to install TOB in
- ;
- (set #TROOTDIR
- (askdir
- (prompt "Where would you like Tower of Babel installed?\n"
- "(a new drawer called 'Tower_of_Babel' will be created here)"
- )
- (help @askdir-help)
- (default #TROOTDIR)
- )
- )
- (set #TDESTDIR (tackon #TROOTDIR "Tower_of_Babel/"))
- (set #TDATDIR (tackon #TDESTDIR "data/"))
-
- ;
- ; Get drive to install from
- ;
- (set #TSRCDRIVE
- (askchoice
- (prompt "Which drive do you wish to install from?")
- (help @askchoice-help)
- (choices "DF0:" "DF1:" "DF2:" "DF3:")
- (default #TSRCDRIVE)
- )
- )
-
- ;
- ; Create the installation directories
- ;
- (makedir #TDESTDIR
- (prompt "The directory '" #TDESTDIR "' will now be created")
- (help @makedir-help)
- (infos)
- (confirm)
- )
-
- (makedir #TDATDIR
- (prompt "The directory '" #TDATDIR "' will now be created")
- (help @makedir-help)
- )
-
- ;
- ; Copy WHDload
- ; Copy now because its required by the data extractor slave
- ;
- (copyfiles
- (prompt "Copying WHDLoad program")
- (help @copyfiles-help)
- (source "WHDLoad")
- (dest #TDESTDIR)
- (nogauge)
- (noposition)
- (optional fail force)
- )
-
- ;
- ; Install the game and save disks
- ;
- (S_InstallGame)
- (S_InstallSaves)
-
- ;
- ; Copy disk drawer icon
- ;
- (copyfiles
- (prompt "Copying HD drawer icon")
- (help @copyfiles-help)
- (source "Drawer.inf")
- (newname "Tower_of_Babel.info")
- (dest #TROOTDIR)
- (nogauge)
- (optional fail force)
- )
-
- ;
- ; Copy slave program
- ;
- (copyfiles
- (prompt "Copying HD loader slave")
- (help @copyfiles-help)
- (source "TOBHD")
- (newname "Tower_of_Babel")
- (dest #TDESTDIR)
- (nogauge)
- (optional fail force)
- )
-
- ;
- ; Copy slave icon and set tooltypes
- ;
- (copyfiles
- (prompt "Copying slave program icon")
- (help @copyfiles-help)
- (source "Slave.inf")
- (newname "Tower_of_Babel.info")
- (dest #TDESTDIR)
- (nogauge)
- (optional fail force)
- )
-
- (tooltype
- (prompt "Setting HD loader slave icon tooltypes")
- (dest (tackon #TDESTDIR "Tower_of_Babel"))
- (setdefaulttool "WHDLoad")
- (settooltype "SLAVE" "Tower_of_Babel")
- (settooltype "NOVBRMOVE" "")
- (settooltype "PRELOAD" "")
- )
-